﻿using TEC.Public.Component.Api;
using TEC.Public.Component.Api.WebApi;
using TongTongMall.Dependecy;
using TongTongMall.MallWeb.Core.Tenant.Services;
using TongTongMall.Threading;

namespace TongTongMall.MallWeb.WebApi.Core.ModelBinders
{
    public class InnerApiBizModelParseModelBinder : ApiBizModelParseModelBinderBase
    {
        private readonly IConfigDomainService _IConfigDomainService;

        public InnerApiBizModelParseModelBinder()
        {
            _IConfigDomainService = IocManager.Instance.Resolve<IConfigDomainService>();

        }
        public override AopServerConfig GetConfig(string appid)
        {
            return AsyncHelper.RunSync(() =>
            {
                return
                   _IConfigDomainService.GetInnerServerApiConfig(appid);
            });
        }
    }
}